#pragma once
#ifdef WIN32
#pragma execution_character_set("utf-8")  
#endif

#include <QWidget>
#include <QTabWidget>
#include <QLinkedList>
#include "ui_CHistoryWidget.h"
#include "CStoryCellTableWidget.h"
#include "CNewsCellTableWidget.h"
#include "CHistoryList.h"

QT_BEGIN_NAMESPACE
namespace Ui { class CHistoryWidgetClass; };
QT_END_NAMESPACE

class CHistoryWidget : public QWidget
{
	Q_OBJECT

public:
	CHistoryWidget(QWidget* parent = nullptr);
	~CHistoryWidget();
	void SetUi(const CHistoryList<CStoryCellData*>& klistHot, const CHistoryList<CStoryCellData*>& klistStory, const CHistoryList<CNewsCellData*>& klistNews, const QObject* kpMiniApp);

	int CurrentTabIndex();
private:
	Ui::CHistoryWidgetClass* ui;
	QTabWidget* m_pTabWidget;

	CStoryCellTableWidget* m_pHotCellTableWidget;
	CStoryCellTableWidget* m_pStoryCellTableWidget;
	CNewsCellTableWidget* m_pNewsCellTableWidget;
};
